package apiday02;


//Object演示
public class ObjectDemo {
    public static void main(String[] args) {
        point p1 = new point(100,200);
        point p2 = new point(100,200);
        System.out.println(p1 == p2);
        System.out.println(p1.equals(p2));//重写equals()中比较的是x和y的值









































        /*
        Point类若不重写Object类的toString()方法，则
         */
         /*
        point p = new point(100,200);
        System.out.println(p.toString());
        System.out.println(p);

        String str = "这是个点:"+p;
        System.out.println(str);
          */
    }
}
